Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass in order terms as sorted to TermInSetQuery() #17714

Merged
merged 20 commits into from
Apr 11, 2025

Conversation

mkhludnev
Copy link
Contributor

@mkhludnev mkhludnev commented Mar 27, 2025

Pass in-order terms as Sorted into TermInSet

Check List

  • Functionality includes testing.
  • becnhmark. Not yet.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

spin off from discussion https://forum.opensearch.org/t/avoid-re-sorting-when-initializing-terminsetquery/23865

Copy link
Contributor

❌ Gradle check result for aa495eb:

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@harshavamsi
Copy link
Contributor

@mkhludnev thanks for adding this change! This looks right, but TermInSetQuery expects that we pass a Collection of ByteRef, but it seems we're using a list here

Copy link
Contributor

❌ Gradle check result for 4aba2a0: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 5808ce4: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for 329035a: SUCCESS

Copy link

codecov bot commented Mar 30, 2025

Codecov Report

Attention: Patch coverage is 98.30508% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.42%. Comparing base (8182bb0) to head (c76663e).
Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
...earch/index/mapper/BytesRefsCollectionBuilder.java 97.50% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17714      +/-   ##
============================================
+ Coverage     72.29%   72.42%   +0.13%     
- Complexity    65900    66031     +131     
============================================
  Files          5350     5351       +1     
  Lines        306185   306229      +44     
  Branches      44373    44374       +1     
============================================
+ Hits         221347   221789     +442     
+ Misses        66670    66306     -364     
+ Partials      18168    18134      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

❌ Gradle check result for ec7707c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❕ Gradle check result for 703d3c4: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Signed-off-by: Mikhail Khludnev <[email protected]>
Copy link
Contributor

github-actions bot commented Apr 1, 2025

❌ Gradle check result for d725111: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Mikhail Khludnev <[email protected]>
Copy link
Contributor

github-actions bot commented Apr 2, 2025

❌ Gradle check result for 5d5a85f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Mikhail Khludnev <[email protected]>
Copy link
Contributor

github-actions bot commented Apr 2, 2025

❌ Gradle check result for 2938244: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Mikhail Khludnev <[email protected]>
Copy link
Contributor

github-actions bot commented Apr 3, 2025

❌ Gradle check result for 38f93f7: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@mkhludnev
Copy link
Contributor Author

mkhludnev commented Apr 3, 2025

one more optimization in Lucene 10.3 apache/lucene#14425

Copy link
Collaborator

@jainankitk jainankitk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mkhludnev for fixing this issue. Few comments to help improve the readability

Signed-off-by: Mikhail Khludnev <[email protected]>
Copy link
Contributor

github-actions bot commented Apr 8, 2025

✅ Gradle check result for c76663e: SUCCESS

@jainankitk jainankitk merged commit 032f409 into opensearch-project:main Apr 11, 2025
32 of 38 checks passed
@jainankitk jainankitk added the backport 2.x Backport to 2.x branch label Apr 11, 2025
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch/backport-2.x
# Create a new branch
git switch --create backport/backport-17714-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 032f4095cf797059e718d74fd2d337d95f8a09a9
# Push it to GitHub
git push --set-upstream origin backport/backport-17714-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-17714-to-2.x.

@mkhludnev
Copy link
Contributor Author

@jainankitk thanks for merging this. Let's remove these redundant test #17902 (pardon, my intent wasn't clear), and then I'll proceed with backporting.

jainankitk pushed a commit that referenced this pull request Apr 11, 2025
Followup for #17714: Remove redundant tests (#17902)
* Remove redundant tests

Signed-off-by: Mikhail Khludnev <[email protected]>

* Fix empty collection test

Signed-off-by: Mikhail Khludnev <[email protected]>

---------

Signed-off-by: Mikhail Khludnev <[email protected]>
mkhludnev added a commit to mkhludnev/OpenSearch that referenced this pull request Apr 12, 2025
…#17714)

* pass in order terms as sorted to TermInSetQuery()

Signed-off-by: Mikhail Khludnev <[email protected]>

* slightly more elegant solution

Signed-off-by: Mikhail Khludnev <[email protected]>

* Attempting mocking TermInSetQ constructor.

Signed-off-by: Mikhail Khludnev <[email protected]>

* Handle ids as well.

Signed-off-by: Mikhail Khludnev <[email protected]>

* forbidden api

Signed-off-by: Mikhail Khludnev <[email protected]>

* make unnecessary method slow but correct.

Signed-off-by: Mikhail Khludnev <[email protected]>

* make unnecessary method slow but correct.

Signed-off-by: Mikhail Khludnev <[email protected]>

* Polish test coverage

Signed-off-by: Mikhail Khludnev <[email protected]>

* CHANGELOG.md

Signed-off-by: Mikhail Khludnev <[email protected]>

* assertThrows

Signed-off-by: Mikhail Khludnev <[email protected]>

* spotlessApply

Signed-off-by: Mikhail Khludnev <[email protected]>

* coverage tests and refactoring

Signed-off-by: Mikhail Khludnev <[email protected]>

* javadoc

Signed-off-by: Mikhail Khludnev <[email protected]>

* javadoc

Signed-off-by: Mikhail Khludnev <[email protected]>

* mark nocommit

Signed-off-by: Mikhail Khludnev <[email protected]>

* one more nocommit test

Signed-off-by: Mikhail Khludnev <[email protected]>

* forbidden api

Signed-off-by: Mikhail Khludnev <[email protected]>

* no commit for out of line tests

Signed-off-by: Mikhail Khludnev <[email protected]>

* Review

Signed-off-by: Mikhail Khludnev <[email protected]>

---------

Signed-off-by: Mikhail Khludnev <[email protected]>
Signed-off-by: Mikhail Khludnev <[email protected]>
mkhludnev added a commit to mkhludnev/OpenSearch that referenced this pull request Apr 12, 2025
Followup for opensearch-project#17714: Remove redundant tests (opensearch-project#17902)
* Remove redundant tests

Signed-off-by: Mikhail Khludnev <[email protected]>

* Fix empty collection test

Signed-off-by: Mikhail Khludnev <[email protected]>

---------

Signed-off-by: Mikhail Khludnev <[email protected]>
@mkhludnev
Copy link
Contributor Author

backport pr #17916

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants